<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Classify extends Model
{
    use HasFactory;

    protected $table = 'classify';

    protected $fillable = ['name', 'name_en', 'description'];

    public function blogs () {
        return $this->hasMany(Blog::class, 'classify_id', 'id')->with('author');
    }
}
